home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-07-13 | 9.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jul 13 10:46:55 1992, modified Mon Jul 13 10:46:55 1992, creator Think C, type ASCII, 9409 bytes "ShowIconFamily.c" , at 0x2541 318 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 10 53 68 6f 77 49 63 | 6f 6e 46 61 6d 69 6c 79 |..ShowIc|onFamily|
|00000010| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 24 c1 00 | 00 01 3e a6 87 47 df a6 |.....$..|..>..G..|
|00000060| 87 47 df 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.G......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 9e 90 00 00 |........|........|
|00000080| 2f 2a 0d 09 53 68 6f 77 | 49 63 6f 6e 46 61 6d 69 |/*..Show|IconFami|
|00000090| 6c 79 2e 63 0d 09 0d 09 | 53 68 6f 77 49 4e 49 54 |ly.c....|ShowINIT|
|000000a0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 72 6f 75 74 | compati|ble rout|
|000000b0| 69 6e 65 20 74 68 61 74 | 20 73 68 6f 77 73 20 27 |ine that| shows '|
|000000c0| 49 43 4e 23 27 20 61 6e | 64 20 27 69 63 6c 78 27 |ICN#' an|d 'iclx'|
|000000d0| 20 66 6c 61 76 6f 72 20 | 69 63 6f 6e 73 2e 0d 09 | flavor |icons...|
|000000e0| 46 6f 72 20 75 73 65 20 | 62 79 20 61 6c 6c 20 49 |For use |by all I|
|000000f0| 4e 49 54 73 20 69 6e 20 | 53 79 73 74 65 6d 20 37 |NITs in |System 7|
|00000100| 20 61 6e 64 20 62 65 79 | 6f 6e 64 2e 0d 09 0d 09 | and bey|ond.....|
|00000110| 62 79 20 50 61 74 72 69 | 63 6b 20 43 2e 20 42 65 |by Patri|ck C. Be|
|00000120| 61 72 64 2e 0d 09 6d 6f | 64 69 66 69 65 64 20 62 |ard...mo|dified b|
|00000130| 79 20 4a 61 6d 65 73 20 | 57 2e 20 57 61 6c 6b 65 |y James |W. Walke|
|00000140| 72 20 66 6f 72 20 63 6f | 6d 70 61 74 69 62 69 6c |r for co|mpatibil|
|00000150| 69 74 79 20 77 69 74 68 | 20 49 63 6f 6e 57 72 61 |ity with| IconWra|
|00000160| 70 20 31 2e 32 2c 0d 09 | 61 6e 64 20 66 6f 72 20 |p 1.2,..|and for |
|00000170| 75 73 65 20 61 73 20 61 | 20 73 65 70 61 72 61 74 |use as a| separat|
|00000180| 65 20 63 6f 64 65 20 72 | 65 73 6f 75 72 63 65 2e |e code r|esource.|
|00000190| 0d 09 0d 09 49 6e 73 74 | 72 75 63 74 69 6f 6e 73 |....Inst|ructions|
|000001a0| 20 66 6f 72 20 75 73 65 | 3a 0d 09 0d 09 09 a5 20 | for use|:...... |
|000001b0| 43 72 65 61 74 65 20 61 | 20 66 61 6d 69 6c 79 20 |Create a| family |
|000001c0| 6f 66 20 69 63 6f 6e 73 | 20 77 69 74 68 20 52 65 |of icons| with Re|
|000001d0| 73 45 64 69 74 20 32 2e | 31 20 6f 72 20 6c 61 74 |sEdit 2.|1 or lat|
|000001e0| 65 72 2e 20 20 54 68 69 | 73 20 77 69 6c 6c 0d 09 |er. Thi|s will..|
|000001f0| 09 09 69 6e 63 6c 75 64 | 65 20 27 49 43 4e 23 27 |..includ|e 'ICN#'|
|00000200| 2c 20 27 69 63 6c 34 27 | 2c 20 26 20 27 69 63 6c |, 'icl4'|, & 'icl|
|00000210| 38 27 20 69 63 6f 6e 73 | 2e 0d 09 09 0d 09 09 54 |8' icons|.......T|
|00000220| 6f 20 75 73 65 20 77 69 | 74 68 69 6e 20 61 20 6c |o use wi|thin a l|
|00000230| 61 72 67 65 72 20 49 4e | 49 54 20 70 72 6f 6a 65 |arger IN|IT proje|
|00000240| 63 74 3a 0d 09 09 09 a5 | 20 23 64 65 66 69 6e 65 |ct:.....| #define|
|00000250| 20 53 45 50 41 52 41 54 | 45 5f 43 4f 44 45 20 30 | SEPARAT|E_CODE 0|
|00000260| 20 20 62 65 6c 6f 77 2e | 0d 09 09 09 a5 20 55 73 | below.|..... Us|
|00000270| 65 20 53 65 74 55 70 41 | 34 20 74 6f 20 73 65 74 |e SetUpA|4 to set|
|00000280| 20 75 70 20 54 68 69 6e | 6b 20 43 20 67 6c 6f 62 | up Thin|k C glob|
|00000290| 61 6c 73 2e 0d 09 09 09 | a5 20 43 61 6c 6c 20 53 |als.....|. Call S|
|000002a0| 68 6f 77 49 63 6f 6e 46 | 61 6d 69 6c 79 28 29 20 |howIconF|amily() |
|000002b0| 77 69 74 68 20 74 68 65 | 20 72 65 73 6f 75 72 63 |with the| resourc|
|000002c0| 65 20 69 64 20 6f 66 20 | 74 68 65 20 66 61 6d 69 |e id of |the fami|
|000002d0| 6c 79 0d 09 09 09 09 74 | 68 61 74 20 79 6f 75 20 |ly.....t|hat you |
|000002e0| 75 73 65 64 2e 0d 09 09 | 0d 09 09 54 6f 20 75 73 |used....|...To us|
|000002f0| 65 20 61 73 20 61 20 73 | 65 70 61 72 61 74 65 20 |e as a s|eparate |
|00000300| 63 6f 64 65 20 72 65 73 | 6f 75 72 63 65 3a 0d 09 |code res|ource:..|
|00000310| 09 09 a5 20 23 64 65 66 | 69 6e 65 20 53 45 50 41 |... #def|ine SEPA|
|00000320| 52 41 54 45 5f 43 4f 44 | 45 20 31 20 20 62 65 6c |RATE_COD|E 1 bel|
|00000330| 6f 77 2e 0d 09 09 09 a5 | 20 53 65 74 20 74 68 65 |ow......| Set the|
|00000340| 20 70 72 6f 6a 65 63 74 | 20 74 79 70 65 20 74 6f | project| type to|
|00000350| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 2c 20 | code re|source, |
|00000360| 73 65 74 20 74 68 65 20 | 63 6f 64 65 20 74 79 70 |set the |code typ|
|00000370| 65 0d 09 09 09 09 61 6e | 64 20 72 65 73 6f 75 72 |e.....an|d resour|
|00000380| 63 65 20 49 44 20 28 49 | 20 75 73 65 20 74 79 70 |ce ID (I| use typ|
|00000390| 65 20 27 43 6f 64 65 27 | 2c 20 49 44 20 2d 34 30 |e 'Code'|, ID -40|
|000003a0| 34 38 20 66 6f 72 20 63 | 64 65 76 73 29 2c 0d 09 |48 for c|devs),..|
|000003b0| 09 09 09 63 6f 6d 70 69 | 6c 65 20 61 6e 64 20 6d |...compi|le and m|
|000003c0| 65 72 67 65 20 69 6e 74 | 6f 20 79 6f 75 72 20 49 |erge int|o your I|
|000003d0| 4e 49 54 20 6f 72 20 63 | 64 65 76 20 66 69 6c 65 |NIT or c|dev file|
|000003e0| 2e 0d 09 09 09 a5 20 49 | 6e 20 79 6f 75 72 20 6d |...... I|n your m|
|000003f0| 61 69 6e 20 49 4e 49 54 | 20 63 6f 64 65 2c 20 63 |ain INIT| code, c|
|00000400| 61 6c 6c 20 53 68 6f 77 | 49 63 6f 6e 46 61 6d 69 |all Show|IconFami|
|00000410| 6c 79 20 6c 69 6b 65 20 | 73 6f 3a 0d 09 09 09 09 |ly like |so:.....|
|00000420| 73 68 6f 77 5f 69 6e 69 | 74 20 3d 20 47 65 74 52 |show_ini|t = GetR|
|00000430| 65 73 6f 75 72 63 65 28 | 20 27 43 6f 64 65 27 2c |esource(| 'Code',|
|00000440| 20 2d 34 30 34 38 20 29 | 3b 0d 09 09 09 09 48 4c | -4048 )|;.....HL|
|00000450| 6f 63 6b 28 20 73 68 6f | 77 5f 69 6e 69 74 20 29 |ock( sho|w_init )|
|00000460| 3b 0d 09 09 09 09 43 61 | 6c 6c 50 61 73 63 61 6c |;.....Ca|llPascal|
|00000470| 28 20 69 63 6f 6e 5f 66 | 61 6d 69 6c 79 5f 49 44 |( icon_f|amily_ID|
|00000480| 2c 20 2a 73 68 6f 77 5f | 69 6e 69 74 20 29 3b 0d |, *show_|init );.|
|00000490| 09 09 09 09 48 55 6e 6c | 6f 63 6b 28 20 73 68 6f |....HUnl|ock( sho|
|000004a0| 77 5f 69 6e 69 74 20 29 | 3b 0d 0d 09 45 6e 68 61 |w_init )|;...Enha|
|000004b0| 6e 63 65 6d 65 6e 74 73 | 3a 0d 09 09 0d 09 09 a5 |ncements|:.......|
|000004c0| 20 55 73 65 73 20 27 69 | 63 6c 78 27 20 26 20 27 | Uses 'i|clx' & '|
|000004d0| 49 43 4e 23 27 20 69 63 | 6f 6e 73 20 66 72 6f 6d |ICN#' ic|ons from|
|000004e0| 20 74 68 65 20 46 69 6e | 64 65 72 27 73 20 22 69 | the Fin|der's "i|
|000004f0| 63 6f 6e 20 66 61 6d 69 | 6c 79 22 20 69 6e 20 53 |con fami|ly" in S|
|00000500| 79 73 74 65 6d 20 37 2e | 0d 09 09 a5 20 47 65 6e |ystem 7.|.... Gen|
|00000510| 65 72 61 74 65 73 20 61 | 20 70 6f 73 69 74 69 6f |erates a| positio|
|00000520| 6e 20 66 6f 72 20 69 63 | 6f 6e 73 20 74 68 61 74 |n for ic|ons that|
|00000530| 20 69 73 20 67 75 61 72 | 61 6e 74 65 65 64 20 74 | is guar|anteed t|
|00000540| 6f 20 62 65 20 6f 6e 20 | 73 63 72 65 65 6e 2c 20 |o be on |screen, |
|00000550| 77 68 69 6c 65 0d 09 09 | 20 20 72 65 6d 61 69 6e |while...| remain|
|00000560| 69 6e 67 20 63 6f 6d 70 | 61 74 69 62 6c 65 20 77 |ing comp|atible w|
|00000570| 69 74 68 20 70 72 65 76 | 69 6f 75 73 20 72 65 6c |ith prev|ious rel|
|00000580| 65 61 73 65 73 20 6f 66 | 20 53 68 6f 77 49 6e 69 |eases of| ShowIni|
|00000590| 74 2e 0d 09 0d 09 54 68 | 69 73 20 63 6f 64 65 20 |t.....Th|is code |
|000005a0| 69 73 20 63 6f 6d 70 6c | 65 74 65 6c 79 20 70 75 |is compl|etely pu|
|000005b0| 62 6c 69 63 20 64 6f 6d | 61 69 6e 2e 20 20 4c 65 |blic dom|ain. Le|
|000005c0| 74 27 73 20 68 6f 70 65 | 20 74 68 69 73 20 62 65 |t's hope| this be|
|000005d0| 63 6f 6d 65 73 20 61 20 | 6e 65 77 20 73 74 61 6e |comes a |new stan|
|000005e0| 64 61 72 64 2e 0d 09 0d | 09 54 68 69 73 20 63 6f |dard....|.This co|
|000005f0| 64 65 20 69 73 20 64 65 | 72 69 76 65 64 20 66 72 |de is de|rived fr|
|00000600| 6f 6d 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |om the o|riginal |
|00000610| 53 68 6f 77 49 6e 69 74 | 20 62 79 20 50 61 75 6c |ShowInit| by Paul|
|00000620| 20 4d 65 72 63 65 72 2c | 20 44 61 72 69 6e 20 41 | Mercer,| Darin A|
|00000630| 64 6c 65 72 2c 0d 09 50 | 61 75 6c 20 53 6e 69 76 |dler,..P|aul Sniv|
|00000640| 65 6c 79 2c 20 61 6e 64 | 20 53 74 65 76 65 20 43 |ely, and| Steve C|
|00000650| 61 70 70 73 2e 0d 09 0d | 09 53 70 65 63 69 61 6c |apps....|.Special|
|00000660| 20 74 68 61 6e 6b 73 20 | 74 6f 20 42 65 6e 20 48 | thanks |to Ben H|
|00000670| 61 6c 6c 65 72 20 26 20 | 52 6f 62 20 56 61 74 65 |aller & |Rob Vate|
|00000680| 72 6c 61 75 73 20 66 6f | 72 20 76 61 6c 75 61 62 |rlaus fo|r valuab|
|00000690| 6c 65 20 73 75 67 67 65 | 73 74 69 6f 6e 73 20 61 |le sugge|stions a|
|000006a0| 6e 64 20 68 65 6c 70 2e | 0d 20 2a 2f 0d 0d 23 64 |nd help.|. */..#d|
|000006b0| 65 66 69 6e 65 20 53 45 | 50 41 52 41 54 45 5f 43 |efine SE|PARATE_C|
|000006c0| 4f 44 45 09 30 0d 0d 23 | 69 66 20 53 45 50 41 52 |ODE.0..#|if SEPAR|
|000006d0| 41 54 45 5f 43 4f 44 45 | 0d 23 69 6e 63 6c 75 64 |ATE_CODE|.#includ|
|000006e0| 65 20 3c 53 65 74 55 70 | 41 34 2e 68 3e 09 2f 2a |e <SetUp|A4.h>./*|
|000006f0| 20 4a 57 57 20 2a 2f 0d | 23 65 6e 64 69 66 0d 0d | JWW */.|#endif..|
|00000700| 23 69 66 6e 64 65 66 20 | 6e 69 6c 0d 23 64 65 66 |#ifndef |nil.#def|
|00000710| 69 6e 65 20 6e 69 6c 20 | 28 28 76 6f 69 64 2a 29 |ine nil |((void*)|
|00000720| 30 4c 29 0d 23 65 6e 64 | 69 66 0d 23 69 66 6e 64 |0L).#end|if.#ifnd|
|00000730| 65 66 20 74 6f 70 4c 65 | 66 74 0d 23 64 65 66 69 |ef topLe|ft.#defi|
|00000740| 6e 65 20 74 6f 70 4c 65 | 66 74 28 72 29 20 28 28 |ne topLe|ft(r) ((|
|00000750| 50 6f 69 6e 74 2a 29 26 | 72 29 5b 30 5d 29 0d 23 |Point*)&|r)[0]).#|
|00000760| 65 6e 64 69 66 0d 23 69 | 66 6e 64 65 66 20 62 6f |endif.#i|fndef bo|
|00000770| 74 52 69 67 68 74 0d 23 | 64 65 66 69 6e 65 20 62 |tRight.#|define b|
|00000780| 6f 74 52 69 67 68 74 28 | 72 29 20 28 28 50 6f 69 |otRight(|r) ((Poi|
|00000790| 6e 74 2a 29 26 72 29 5b | 31 5d 29 0d 23 65 6e 64 |nt*)&r)[|1]).#end|
|000007a0| 69 66 0d 0d 74 79 70 65 | 64 65 66 20 73 74 72 75 |if..type|def stru|
|000007b0| 63 74 20 51 44 47 6c 6f | 62 61 6c 73 20 7b 0d 09 |ct QDGlo|bals {..|
|000007c0| 63 68 61 72 20 70 72 69 | 76 61 74 65 73 5b 37 36 |char pri|vates[76|
|000007d0| 5d 3b 0d 09 6c 6f 6e 67 | 20 72 61 6e 64 53 65 65 |];..long| randSee|
|000007e0| 64 3b 0d 09 42 69 74 4d | 61 70 20 73 63 72 65 65 |d;..BitM|ap scree|
|000007f0| 6e 42 69 74 73 3b 0d 09 | 43 75 72 73 6f 72 20 61 |nBits;..|Cursor a|
|00000800| 72 72 6f 77 3b 0d 09 50 | 61 74 74 65 72 6e 20 64 |rrow;..P|attern d|
|00000810| 6b 47 72 61 79 3b 0d 09 | 50 61 74 74 65 72 6e 20 |kGray;..|Pattern |
|00000820| 6c 74 47 72 61 79 3b 0d | 09 50 61 74 74 65 72 6e |ltGray;.|.Pattern|
|00000830| 20 67 72 61 79 3b 0d 09 | 50 61 74 74 65 72 6e 20 | gray;..|Pattern |
|00000840| 62 6c 61 63 6b 3b 0d 09 | 50 61 74 74 65 72 6e 20 |black;..|Pattern |
|00000850| 77 68 69 74 65 3b 0d 09 | 47 72 61 66 50 74 72 20 |white;..|GrafPtr |
|00000860| 74 68 65 50 6f 72 74 3b | 0d 09 6c 6f 6e 67 09 65 |thePort;|..long.e|
|00000870| 6e 64 3b 0d 7d 20 51 44 | 47 6c 6f 62 61 6c 73 3b |nd;.} QD|Globals;|
|00000880| 0d 0d 73 74 61 74 69 63 | 20 73 68 6f 72 74 20 74 |..static| short t|
|00000890| 68 65 44 65 70 74 68 3b | 09 09 09 09 2f 2a 20 74 |heDepth;|..../* t|
|000008a0| 68 65 20 64 65 70 74 68 | 20 74 68 65 20 6d 6f 6e |he depth| the mon|
|000008b0| 69 74 6f 72 20 69 73 20 | 69 6e 2e 20 2a 2f 0d 73 |itor is |in. */.s|
|000008c0| 74 61 74 69 63 20 43 47 | 72 61 66 50 74 72 20 70 |tatic CG|rafPtr p|
|000008d0| 6f 72 74 3b 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |ort;..st|atic voi|
|000008e0| 64 20 44 72 61 77 42 57 | 49 63 6f 6e 28 73 68 6f |d DrawBW|Icon(sho|
|000008f0| 72 74 20 69 63 6f 6e 49 | 64 29 3b 0d 73 74 61 74 |rt iconI|d);.stat|
|00000900| 69 63 20 76 6f 69 64 20 | 44 72 61 77 43 6f 6c 6f |ic void |DrawColo|
|00000910| 72 49 63 6f 6e 28 73 68 | 6f 72 74 20 69 63 6f 6e |rIcon(sh|ort icon|
|00000920| 49 64 29 3b 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |Id);.sta|tic void|
|00000930| 20 4e 65 78 74 5f 70 6f | 73 69 74 69 6f 6e 28 20 | Next_po|sition( |
|00000940| 76 6f 69 64 20 29 3b 0d | 0d 2f 2a 20 74 68 69 73 |void );.|./* this|
|00000950| 20 69 73 20 77 68 65 72 | 65 20 69 74 20 61 6c 6c | is wher|e it all|
|00000960| 20 68 61 70 70 65 6e 73 | 2e 20 2a 2f 0d 0d 23 69 | happens|. */..#i|
|00000970| 66 20 53 45 50 41 52 41 | 54 45 5f 43 4f 44 45 0d |f SEPARA|TE_CODE.|
|00000980| 76 6f 69 64 20 6d 61 69 | 6e 28 73 68 6f 72 74 20 |void mai|n(short |
|00000990| 69 63 6f 6e 49 64 29 0d | 23 65 6c 73 65 0d 76 6f |iconId).|#else.vo|
|000009a0| 69 64 20 53 68 6f 77 49 | 63 6f 6e 46 61 6d 69 6c |id ShowI|conFamil|
|000009b0| 79 28 73 68 6f 72 74 20 | 69 63 6f 6e 49 64 29 0d |y(short |iconId).|
|000009c0| 23 65 6e 64 69 66 0d 7b | 0d 09 6c 6f 6e 67 20 6f |#endif.{|..long o|
|000009d0| 6c 64 41 35 3b 0d 09 51 | 44 47 6c 6f 62 61 6c 73 |ldA5;..Q|DGlobals|
|000009e0| 20 71 64 3b 09 09 09 09 | 2f 2a 20 6f 75 72 20 51 | qd;....|/* our Q|
|000009f0| 44 20 67 6c 6f 62 61 6c | 73 2e 20 2a 2f 0d 09 53 |D global|s. */..S|
|00000a00| 79 73 45 6e 76 52 65 63 | 20 65 6e 76 69 72 6f 6e |ysEnvRec| environ|
|00000a10| 6d 65 6e 74 3b 09 09 2f | 2a 20 6d 61 63 68 69 6e |ment;../|* machin|
|00000a20| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2e |e config|uration.|
|00000a30| 20 2a 2f 0d 09 43 47 72 | 61 66 50 6f 72 74 20 67 | */..CGr|afPort g|
|00000a40| 70 3b 09 09 09 09 2f 2a | 20 6f 75 72 20 67 72 61 |p;..../*| our gra|
|00000a50| 66 70 6f 72 74 2e 20 2a | 2f 0d 09 0d 23 69 66 20 |fport. *|/...#if |
|00000a60| 53 45 50 41 52 41 54 45 | 5f 43 4f 44 45 0d 09 52 |SEPARATE|_CODE..R|
|00000a70| 65 6d 65 6d 62 65 72 41 | 30 28 29 3b 20 2f 2a 20 |ememberA|0(); /* |
|00000a80| 4a 57 57 20 2a 2f 0d 09 | 53 65 74 55 70 41 34 28 |JWW */..|SetUpA4(|
|00000a90| 29 3b 20 2f 2a 20 4a 57 | 57 20 2a 2f 0d 23 65 6e |); /* JW|W */.#en|
|00000aa0| 64 69 66 0d 09 0d 09 2f | 2a 20 67 65 74 20 61 20 |dif..../|* get a |
|00000ab0| 76 61 6c 75 65 20 66 6f | 72 20 41 35 2c 20 61 20 |value fo|r A5, a |
|00000ac0| 73 74 72 75 63 74 75 72 | 65 20 74 68 61 74 20 6d |structur|e that m|
|00000ad0| 69 72 72 6f 72 73 20 71 | 64 20 67 6c 6f 62 61 6c |irrors q|d global|
|00000ae0| 73 2e 20 2a 2f 0d 09 6f | 6c 64 41 35 20 3d 20 53 |s. */..o|ldA5 = S|
|00000af0| 65 74 41 35 28 28 6c 6f | 6e 67 29 26 71 64 2e 65 |etA5((lo|ng)&qd.e|
|00000b00| 6e 64 29 3b 0d 09 49 6e | 69 74 47 72 61 66 28 26 |nd);..In|itGraf(&|
|00000b10| 71 64 2e 74 68 65 50 6f | 72 74 29 3b 0d 09 0d 09 |qd.thePo|rt);....|
|00000b20| 2f 2a 20 66 69 6e 64 20 | 6f 75 74 20 77 68 61 74 |/* find |out what|
|00000b30| 20 6b 69 6e 64 20 6f 66 | 20 6d 61 63 68 69 6e 65 | kind of| machine|
|00000b40| 20 74 68 69 73 20 69 73 | 2e 20 2a 2f 0d 09 53 79 | this is|. */..Sy|
|00000b50| 73 45 6e 76 69 72 6f 6e | 73 28 63 75 72 53 79 73 |sEnviron|s(curSys|
|00000b60| 45 6e 76 56 65 72 73 2c | 20 26 65 6e 76 69 72 6f |EnvVers,| &enviro|
|00000b70| 6e 6d 65 6e 74 29 3b 0d | 09 69 66 20 28 65 6e 76 |nment);.|.if (env|
|00000b80| 69 72 6f 6e 6d 65 6e 74 | 2e 68 61 73 43 6f 6c 6f |ironment|.hasColo|
|00000b90| 72 51 44 29 20 7b 0d 09 | 09 74 68 65 44 65 70 74 |rQD) {..|.theDept|
|00000ba0| 68 20 3d 20 28 2a 2a 28 | 2a 2a 47 65 74 4d 61 69 |h = (**(|**GetMai|
|00000bb0| 6e 44 65 76 69 63 65 28 | 29 29 2e 67 64 50 4d 61 |nDevice(|)).gdPMa|
|00000bc0| 70 29 2e 70 69 78 65 6c | 53 69 7a 65 3b 0d 09 09 |p).pixel|Size;...|
|00000bd0| 69 66 20 28 74 68 65 44 | 65 70 74 68 20 3c 20 34 |if (theD|epth < 4|
|00000be0| 29 0d 09 09 09 74 68 65 | 44 65 70 74 68 20 3d 20 |)....the|Depth = |
|00000bf0| 31 3b 0d 09 7d 20 65 6c | 73 65 20 7b 0d 09 09 74 |1;..} el|se {...t|
|00000c00| 68 65 44 65 70 74 68 20 | 3d 20 31 3b 0d 09 7d 0d |heDepth |= 1;..}.|
|00000c10| 0d 09 2f 2a 20 73 65 65 | 20 77 68 61 74 20 74 79 |../* see| what ty|
|00000c20| 70 65 20 6f 66 20 70 6f | 72 74 20 74 6f 20 6f 70 |pe of po|rt to op|
|00000c30| 65 6e 2e 20 2a 2f 0d 09 | 69 66 20 28 74 68 65 44 |en. */..|if (theD|
|00000c40| 65 70 74 68 20 3e 3d 20 | 34 29 20 7b 0d 09 09 4f |epth >= |4) {...O|
|00000c50| 70 65 6e 43 50 6f 72 74 | 28 26 67 70 29 3b 0d 09 |penCPort|(&gp);..|
|00000c60| 7d 20 65 6c 73 65 20 7b | 0d 09 09 4f 70 65 6e 50 |} else {|...OpenP|
|00000c70| 6f 72 74 28 28 47 72 61 | 66 50 74 72 29 26 67 70 |ort((Gra|fPtr)&gp|
|00000c80| 29 3b 0d 09 7d 0d 09 70 | 6f 72 74 20 3d 20 26 67 |);..}..p|ort = &g|
|00000c90| 70 3b 0d 09 0d 09 69 66 | 20 28 74 68 65 44 65 70 |p;....if| (theDep|
|00000ca0| 74 68 20 3d 3d 20 31 29 | 0d 09 09 44 72 61 77 42 |th == 1)|...DrawB|
|00000cb0| 57 49 63 6f 6e 28 69 63 | 6f 6e 49 64 29 3b 0d 09 |WIcon(ic|onId);..|
|00000cc0| 65 6c 73 65 0d 09 09 44 | 72 61 77 43 6f 6c 6f 72 |else...D|rawColor|
|00000cd0| 49 63 6f 6e 28 69 63 6f | 6e 49 64 29 3b 0d 09 0d |Icon(ico|nId);...|
|00000ce0| 09 4e 65 78 74 5f 70 6f | 73 69 74 69 6f 6e 28 29 |.Next_po|sition()|
|00000cf0| 3b 20 2f 2a 20 4a 57 57 | 20 2a 2f 0d 0d 09 53 65 |; /* JWW| */...Se|
|00000d00| 74 41 35 28 6f 6c 64 41 | 35 29 3b 0d 23 69 66 20 |tA5(oldA|5);.#if |
|00000d10| 53 45 50 41 52 41 54 45 | 5f 43 4f 44 45 0d 09 52 |SEPARATE|_CODE..R|
|00000d20| 65 73 74 6f 72 65 41 34 | 28 29 3b 0d 23 65 6e 64 |estoreA4|();.#end|
|00000d30| 69 66 0d 7d 0d 0d 2f 2a | 0d 09 53 68 6f 77 49 6e |if.}../*|..ShowIn|
|00000d40| 69 74 27 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |it's inf|ormation|
|00000d50| 20 69 73 20 6e 65 73 74 | 6c 65 64 20 61 74 20 74 | is nest|led at t|
|00000d60| 68 65 20 74 61 69 6c 20 | 65 6e 64 20 6f 66 20 43 |he tail |end of C|
|00000d70| 75 72 41 70 4e 61 6d 65 | 2e 0d 09 49 74 20 63 6f |urApName|...It co|
|00000d80| 6e 73 69 73 74 73 20 6f | 66 20 61 20 73 68 6f 72 |nsists o|f a shor|
|00000d90| 74 20 77 68 69 63 68 20 | 65 6e 63 6f 64 65 73 20 |t which |encodes |
|00000da0| 74 68 65 20 6e 65 78 74 | 20 68 6f 72 69 7a 6f 6e |the next| horizon|
|00000db0| 74 61 6c 20 6f 66 66 73 | 65 74 2c 0d 09 61 6e 64 |tal offs|et,..and|
|00000dc0| 20 61 6e 6f 74 68 65 72 | 20 73 68 6f 72 74 20 77 | another| short w|
|00000dd0| 68 69 63 68 20 69 73 20 | 74 68 61 74 20 76 61 6c |hich is |that val|
|00000de0| 75 65 20 63 68 65 63 6b | 73 75 6d 6d 65 64 20 77 |ue check|summed w|
|00000df0| 69 74 68 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |ith the |function|
|00000e00| 20 62 65 6c 6f 77 2e 0d | 20 2a 2f 0d 0d 23 64 65 | below..| */..#de|
|00000e10| 66 69 6e 65 20 43 75 72 | 41 70 4e 61 6d 65 5f 4c |fine Cur|ApName_L|
|00000e20| 4d 09 30 78 39 31 30 0d | 23 64 65 66 69 6e 65 20 |M.0x910.|#define |
|00000e30| 53 68 6f 77 49 4e 49 54 | 54 61 62 6c 65 20 28 28 |ShowINIT|Table ((|
|00000e40| 73 68 6f 72 74 2a 29 28 | 43 75 72 41 70 4e 61 6d |short*)(|CurApNam|
|00000e50| 65 5f 4c 4d 20 2b 20 33 | 32 20 2d 20 34 29 29 0d |e_LM + 3|2 - 4)).|
|00000e60| 23 64 65 66 69 6e 65 20 | 43 68 65 63 6b 53 75 6d |#define |CheckSum|
|00000e70| 43 6f 6e 73 74 20 30 78 | 31 30 32 31 09 09 2f 2a |Const 0x|1021../*|
|00000e80| 20 6d 61 67 69 63 20 76 | 61 6c 75 65 20 74 6f 20 | magic v|alue to |
|00000e90| 63 68 65 63 6b 2d 73 75 | 6d 20 77 69 74 68 2e 20 |check-su|m with. |
|00000ea0| 2a 2f 0d 0d 23 64 65 66 | 69 6e 65 20 49 6e 69 74 |*/..#def|ine Init|
|00000eb0| 69 61 6c 58 50 6f 73 69 | 74 69 6f 6e 20 38 09 09 |ialXPosi|tion 8..|
|00000ec0| 09 2f 2a 20 69 6e 69 74 | 69 61 6c 20 68 6f 72 69 |./* init|ial hori|
|00000ed0| 7a 6f 6e 74 61 6c 20 6f | 66 66 73 65 74 2e 20 2a |zontal o|ffset. *|
|00000ee0| 2f 0d 23 64 65 66 69 6e | 65 20 59 4f 66 66 73 65 |/.#defin|e YOffse|
|00000ef0| 74 09 09 09 34 30 09 09 | 09 2f 2a 20 63 6f 6e 73 |t...40..|./* cons|
|00000f00| 74 61 6e 74 20 66 72 6f | 6d 20 62 6f 74 74 6f 6d |tant fro|m bottom|
|00000f10| 20 74 6f 20 70 6c 61 63 | 65 20 74 68 65 20 69 63 | to plac|e the ic|
|00000f20| 6f 6e 2e 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 58 |on. */.#|define X|
|00000f30| 4f 66 66 73 65 74 09 09 | 09 34 30 09 09 09 2f 2a |Offset..|.40.../*|
|00000f40| 20 61 6d 6f 75 6e 74 20 | 74 6f 20 63 68 61 6e 67 | amount |to chang|
|00000f50| 65 20 69 74 20 62 79 2e | 20 2a 2f 0d 0d 2f 2a 20 |e it by.| */../* |
|00000f60| 43 68 65 63 6b 53 75 6d | 28 29 20 63 6f 6d 70 75 |CheckSum|() compu|
|00000f70| 74 65 73 20 74 68 65 20 | 6d 61 67 69 63 20 76 61 |tes the |magic va|
|00000f80| 6c 75 65 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |lue to d|etermine|
|00000f90| 20 69 66 20 53 68 6f 77 | 49 6e 69 74 27 73 20 68 | if Show|Init's h|
|00000fa0| 61 76 65 20 72 75 6e 20 | 61 6c 72 65 61 64 79 2e |ave run |already.|
|00000fb0| 20 2a 2f 0d 0d 73 74 61 | 74 69 63 20 73 68 6f 72 | */..sta|tic shor|
|00000fc0| 74 20 43 68 65 63 6b 53 | 75 6d 28 72 65 67 69 73 |t CheckS|um(regis|
|00000fd0| 74 65 72 20 73 68 6f 72 | 74 20 78 29 0d 7b 0d 09 |ter shor|t x).{..|
|00000fe0| 61 73 6d 20 7b 0d 09 09 | 72 6f 6c 2e 77 09 23 31 |asm {...|rol.w.#1|
|00000ff0| 2c 20 78 0d 09 7d 0d 09 | 72 65 74 75 72 6e 20 28 |, x..}..|return (|
|00001000| 78 20 5e 20 43 68 65 63 | 6b 53 75 6d 43 6f 6e 73 |x ^ Chec|kSumCons|
|00001010| 74 29 3b 0d 7d 0d 0d 2f | 2a 0d 09 47 65 74 49 63 |t);.}../|*..GetIc|
|00001020| 6f 6e 52 65 63 74 28 29 | 20 67 65 6e 65 72 61 74 |onRect()| generat|
|00001030| 65 73 20 61 6e 20 61 70 | 70 72 6f 70 72 69 61 74 |es an ap|propriat|
|00001040| 65 20 72 65 63 74 61 6e | 67 6c 65 20 74 6f 20 64 |e rectan|gle to d|
|00001050| 69 73 70 6c 61 79 20 74 | 68 65 0d 09 6e 65 78 74 |isplay t|he..next|
|00001060| 20 49 4e 49 54 27 73 20 | 69 63 6f 6e 20 69 6e 2e | INIT's |icon in.|
|00001070| 0d 09 49 74 20 69 73 20 | 61 6c 73 6f 20 72 65 73 |..It is |also res|
|00001080| 70 6f 6e 73 69 62 6c 65 | 20 66 6f 72 20 75 70 64 |ponsible| for upd|
|00001090| 61 74 69 6e 67 20 74 68 | 65 20 68 6f 72 69 7a 6f |ating th|e horizo|
|000010a0| 6e 74 61 6c 0d 09 70 6f | 73 69 74 69 6f 6e 20 69 |ntal..po|sition i|
|000010b0| 6e 20 6c 6f 77 20 6d 65 | 6d 6f 72 79 2e 20 20 54 |n low me|mory. T|
|000010c0| 68 69 73 20 69 73 20 61 | 20 64 65 70 61 72 74 75 |his is a| departu|
|000010d0| 72 65 20 66 72 6f 6d 0d | 09 74 68 65 20 6f 72 69 |re from.|.the ori|
|000010e0| 67 69 6e 61 6c 20 53 68 | 6f 77 49 6e 69 74 20 63 |ginal Sh|owInit c|
|000010f0| 6f 64 65 2c 20 77 68 69 | 63 68 20 75 70 64 61 74 |ode, whi|ch updat|
|00001100| 65 73 20 6c 6f 77 0d 09 | 6d 65 6d 6f 72 79 20 41 |es low..|memory A|
|00001110| 46 54 45 52 20 64 69 73 | 70 6c 61 79 69 6e 67 20 |FTER dis|playing |
|00001120| 74 68 65 20 69 63 6f 6e | 2e 20 2d 2d 20 63 68 61 |the icon|. -- cha|
|00001130| 6e 67 65 64 20 62 79 20 | 4a 57 57 0d 09 54 68 69 |nged by |JWW..Thi|
|00001140| 73 20 63 6f 64 65 20 77 | 6f 6e 27 74 20 67 65 6e |s code w|on't gen|
|00001150| 65 72 61 74 65 20 61 6e | 20 69 63 6f 6e 20 70 6f |erate an| icon po|
|00001160| 73 69 74 69 6f 6e 20 75 | 6e 74 69 6c 20 69 74 20 |sition u|ntil it |
|00001170| 69 73 20 63 65 72 74 61 | 69 6e 20 74 68 61 74 20 |is certa|in that |
|00001180| 74 68 65 20 69 63 6f 6e | 20 63 61 6e 20 62 65 20 |the icon| can be |
|00001190| 6c 6f 61 64 65 64 2c 20 | 73 6f 20 74 68 65 0d 09 |loaded, |so the..|
|000011a0| 73 61 6d 65 20 62 65 68 | 61 76 69 6f 75 72 20 6f |same beh|aviour o|
|000011b0| 63 63 75 72 73 2e 0d 09 | 0d 09 54 68 69 73 20 72 |ccurs...|..This r|
|000011c0| 6f 75 74 69 6e 65 20 61 | 6c 73 6f 20 67 65 6e 65 |outine a|lso gene|
|000011d0| 72 61 74 65 73 20 61 20 | 72 65 63 74 61 6e 67 6c |rates a |rectangl|
|000011e0| 65 20 77 68 69 63 68 20 | 69 73 20 67 75 61 72 61 |e which |is guara|
|000011f0| 6e 74 65 65 64 20 74 6f | 20 62 65 20 6f 6e 73 63 |nteed to| be onsc|
|00001200| 72 65 65 6e 2e 20 20 49 | 74 0d 09 64 6f 65 73 20 |reen. I|t..does |
|00001210| 74 68 69 73 20 62 79 20 | 74 61 6b 69 6e 67 20 74 |this by |taking t|
|00001220| 68 65 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 6f 66 |he horiz|ontal of|
|00001230| 66 73 65 74 20 6d 6f 64 | 75 6c 6f 20 74 68 65 20 |fset mod|ulo the |
|00001240| 73 63 72 65 65 6e 20 77 | 69 64 74 68 20 74 6f 20 |screen w|idth to |
|00001250| 67 65 6e 65 72 61 74 65 | 0d 09 74 68 65 20 68 6f |generate|..the ho|
|00001260| 72 69 7a 6f 6e 74 61 6c | 20 70 6f 73 69 74 69 6f |rizontal| positio|
|00001270| 6e 20 6f 66 20 74 68 65 | 20 69 63 6f 6e 2c 20 61 |n of the| icon, a|
|00001280| 6e 64 20 74 68 65 20 6f | 66 66 73 65 74 20 64 69 |nd the o|ffset di|
|00001290| 76 69 64 65 64 20 62 79 | 20 74 68 65 20 73 63 72 |vided by| the scr|
|000012a0| 65 65 6e 0d 09 77 69 64 | 74 68 20 74 6f 20 67 65 |een..wid|th to ge|
|000012b0| 6e 65 72 61 74 65 20 74 | 68 65 20 70 72 6f 70 65 |nerate t|he prope|
|000012c0| 72 20 72 6f 77 2e 0d 20 | 2a 2f 0d 0d 76 6f 69 64 |r row.. |*/..void|
|000012d0| 20 47 65 74 49 63 6f 6e | 52 65 63 74 28 72 65 67 | GetIcon|Rect(reg|
|000012e0| 69 73 74 65 72 20 52 65 | 63 74 2a 20 69 63 6f 6e |ister Re|ct* icon|
|000012f0| 52 65 63 74 29 0d 7b 0d | 09 72 65 67 69 73 74 65 |Rect).{.|.registe|
|00001300| 72 20 73 68 6f 72 74 20 | 73 63 72 65 65 6e 57 69 |r short |screenWi|
|00001310| 64 74 68 20 3d 20 70 6f | 72 74 2d 3e 70 6f 72 74 |dth = po|rt->port|
|00001320| 52 65 63 74 2e 72 69 67 | 68 74 20 2d 20 70 6f 72 |Rect.rig|ht - por|
|00001330| 74 2d 3e 70 6f 72 74 52 | 65 63 74 2e 6c 65 66 74 |t->portR|ect.left|
|00001340| 3b 0d 09 2f 2a 20 69 66 | 20 77 65 20 61 72 65 20 |;../* if| we are |
|00001350| 74 68 65 20 66 69 72 73 | 74 20 49 4e 49 54 20 74 |the firs|t INIT t|
|00001360| 6f 20 72 75 6e 20 77 65 | 20 6e 65 65 64 20 74 6f |o run we| need to|
|00001370| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 74 68 65 20 | initial|ize the |
|00001380| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 76 61 6c 75 65 |horizont|al value|
|00001390| 2e 20 2a 2f 0d 09 69 66 | 20 28 43 68 65 63 6b 53 |. */..if| (CheckS|
|000013a0| 75 6d 28 53 68 6f 77 49 | 4e 49 54 54 61 62 6c 65 |um(ShowI|NITTable|
|000013b0| 5b 30 5d 29 20 21 3d 20 | 53 68 6f 77 49 4e 49 54 |[0]) != |ShowINIT|
|000013c0| 54 61 62 6c 65 5b 31 5d | 29 0d 09 09 53 68 6f 77 |Table[1]|)...Show|
|000013d0| 49 4e 49 54 54 61 62 6c | 65 5b 30 5d 20 3d 20 49 |INITTabl|e[0] = I|
|000013e0| 6e 69 74 69 61 6c 58 50 | 6f 73 69 74 69 6f 6e 3b |nitialXP|osition;|
|000013f0| 0d 09 0d 09 2f 2a 20 63 | 6f 6d 70 75 74 65 20 74 |..../* c|ompute t|
|00001400| 6f 70 20 6c 65 66 74 20 | 6f 66 20 69 63 6f 6e 27 |op left |of icon'|
|00001410| 73 20 72 65 63 74 2e 20 | 2a 2f 0d 09 69 63 6f 6e |s rect. |*/..icon|
|00001420| 52 65 63 74 2d 3e 6c 65 | 66 74 20 3d 20 28 53 68 |Rect->le|ft = (Sh|
|00001430| 6f 77 49 4e 49 54 54 61 | 62 6c 65 5b 30 5d 20 25 |owINITTa|ble[0] %|
|00001440| 20 73 63 72 65 65 6e 57 | 69 64 74 68 29 3b 0d 09 | screenW|idth);..|
|00001450| 69 63 6f 6e 52 65 63 74 | 2d 3e 74 6f 70 20 3d 20 |iconRect|->top = |
|00001460| 70 6f 72 74 2d 3e 70 6f | 72 74 52 65 63 74 2e 62 |port->po|rtRect.b|
|00001470| 6f 74 74 6f 6d 20 2d 20 | 59 4f 66 66 73 65 74 20 |ottom - |YOffset |
|00001480| 2a 20 28 31 20 2b 20 28 | 53 68 6f 77 49 4e 49 54 |* (1 + (|ShowINIT|
|00001490| 54 61 62 6c 65 5b 30 5d | 20 2f 20 73 63 72 65 65 |Table[0]| / scree|
|000014a0| 6e 57 69 64 74 68 29 29 | 3b 0d 09 69 63 6f 6e 52 |nWidth))|;..iconR|
|000014b0| 65 63 74 2d 3e 72 69 67 | 68 74 20 3d 20 69 63 6f |ect->rig|ht = ico|
|000014c0| 6e 52 65 63 74 2d 3e 6c | 65 66 74 20 2b 20 33 32 |nRect->l|eft + 32|
|000014d0| 3b 0d 09 69 63 6f 6e 52 | 65 63 74 2d 3e 62 6f 74 |;..iconR|ect->bot|
|000014e0| 74 6f 6d 20 3d 20 69 63 | 6f 6e 52 65 63 74 2d 3e |tom = ic|onRect->|
|000014f0| 74 6f 70 20 2b 20 33 32 | 3b 0d 09 0d 7d 0d 0d 2f |top + 32|;...}../|
|00001500| 2a 0d 09 4a 57 57 3a 20 | 49 6e 20 42 65 61 72 64 |*..JWW: |In Beard|
|00001510| 27 73 20 6f 72 69 67 69 | 6e 61 6c 20 76 65 72 73 |'s origi|nal vers|
|00001520| 69 6f 6e 2c 20 74 68 69 | 73 20 77 61 73 20 64 6f |ion, thi|s was do|
|00001530| 6e 65 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |ne at th|e end of|
|00001540| 0d 09 47 65 74 49 63 6f | 6e 52 65 63 74 2e 20 54 |..GetIco|nRect. T|
|00001550| 68 61 74 20 63 61 75 73 | 65 64 20 69 6e 63 6f 72 |hat caus|ed incor|
|00001560| 72 65 63 74 20 62 65 68 | 61 76 69 6f 72 20 77 68 |rect beh|avior wh|
|00001570| 65 6e 20 49 63 6f 6e 57 | 72 61 70 20 31 2e 32 20 |en IconW|rap 1.2 |
|00001580| 77 61 73 0d 09 75 73 65 | 64 20 74 6f 20 77 72 61 |was..use|d to wra|
|00001590| 70 20 69 63 6f 6e 73 2e | 20 20 4e 61 6d 65 6c 79 |p icons.| Namely|
|000015a0| 2c 20 69 66 20 61 6e 20 | 49 4e 49 54 20 75 73 69 |, if an |INIT usi|
|000015b0| 6e 67 20 74 68 61 74 20 | 76 65 72 73 69 6f 6e 20 |ng that |version |
|000015c0| 6f 66 0d 09 53 68 6f 77 | 49 63 6f 6e 46 61 6d 69 |of..Show|IconFami|
|000015d0| 6c 79 20 77 61 73 20 74 | 68 65 20 66 69 72 73 74 |ly was t|he first|
|000015e0| 20 69 6e 20 61 20 72 6f | 77 2c 20 74 68 65 6e 20 | in a ro|w, then |
|000015f0| 74 68 65 20 73 65 63 6f | 6e 64 20 69 63 6f 6e 20 |the seco|nd icon |
|00001600| 69 6e 20 74 68 61 74 0d | 09 72 6f 77 20 77 6f 75 |in that.|.row wou|
|00001610| 6c 64 20 6c 61 6e 64 20 | 6f 6e 20 74 6f 70 20 6f |ld land |on top o|
|00001620| 66 20 69 74 2e 0d 2a 2f | 0d 73 74 61 74 69 63 20 |f it..*/|.static |
|00001630| 76 6f 69 64 20 4e 65 78 | 74 5f 70 6f 73 69 74 69 |void Nex|t_positi|
|00001640| 6f 6e 28 20 76 6f 69 64 | 20 29 0d 7b 0d 09 2f 2a |on( void| ).{../*|
|00001650| 20 61 64 76 61 6e 63 65 | 20 74 68 65 20 70 6f 73 | advance| the pos|
|00001660| 69 74 69 6f 6e 20 66 6f | 72 20 74 68 65 20 6e 65 |ition fo|r the ne|
|00001670| 78 74 20 69 63 6f 6e 2e | 20 2a 2f 0d 09 53 68 6f |xt icon.| */..Sho|
|00001680| 77 49 4e 49 54 54 61 62 | 6c 65 5b 30 5d 20 2b 3d |wINITTab|le[0] +=|
|00001690| 20 58 4f 66 66 73 65 74 | 3b 0d 09 0d 09 2f 2a 20 | XOffset|;..../* |
|000016a0| 72 65 63 6f 6d 70 75 74 | 65 20 74 68 65 20 63 68 |recomput|e the ch|
|000016b0| 65 63 6b 73 75 6d 2e 20 | 2a 2f 0d 09 53 68 6f 77 |ecksum. |*/..Show|
|000016c0| 49 4e 49 54 54 61 62 6c | 65 5b 31 5d 20 3d 20 43 |INITTabl|e[1] = C|
|000016d0| 68 65 63 6b 53 75 6d 28 | 53 68 6f 77 49 4e 49 54 |heckSum(|ShowINIT|
|000016e0| 54 61 62 6c 65 5b 30 5d | 29 3b 09 0d 7d 0d 0d 2f |Table[0]|);..}../|
|000016f0| 2a 20 44 72 61 77 42 57 | 49 63 6f 6e 28 29 20 64 |* DrawBW|Icon() d|
|00001700| 72 61 77 73 20 74 68 65 | 20 27 49 43 4e 23 27 20 |raws the| 'ICN#' |
|00001710| 6d 65 6d 62 65 72 20 6f | 66 20 74 68 65 20 69 63 |member o|f the ic|
|00001720| 6f 6e 20 66 61 6d 69 6c | 79 2e 20 2a 2f 0d 0d 76 |on famil|y. */..v|
|00001730| 6f 69 64 20 44 72 61 77 | 42 57 49 63 6f 6e 28 73 |oid Draw|BWIcon(s|
|00001740| 68 6f 72 74 20 69 63 6f | 6e 49 64 29 0d 7b 0d 09 |hort ico|nId).{..|
|00001750| 48 61 6e 64 6c 65 20 69 | 63 6f 6e 3b 0d 09 52 65 |Handle i|con;..Re|
|00001760| 63 74 20 69 63 6f 6e 52 | 65 63 74 3b 0d 09 42 69 |ct iconR|ect;..Bi|
|00001770| 74 4d 61 70 20 73 6f 75 | 72 63 65 2c 20 64 65 73 |tMap sou|rce, des|
|00001780| 74 69 6e 61 74 69 6f 6e | 3b 0d 09 0d 09 69 63 6f |tination|;....ico|
|00001790| 6e 20 3d 20 47 65 74 31 | 52 65 73 6f 75 72 63 65 |n = Get1|Resource|
|000017a0| 28 27 49 43 4e 23 27 2c | 20 69 63 6f 6e 49 64 29 |('ICN#',| iconId)|
|000017b0| 3b 0d 09 69 66 20 28 21 | 69 63 6f 6e 29 0d 09 09 |;..if (!|icon)...|
|000017c0| 72 65 74 75 72 6e 3b 0d | 09 48 4c 6f 63 6b 28 69 |return;.|.HLock(i|
|000017d0| 63 6f 6e 29 3b 0d 09 0d | 09 47 65 74 49 63 6f 6e |con);...|.GetIcon|
|000017e0| 52 65 63 74 28 26 69 63 | 6f 6e 52 65 63 74 29 3b |Rect(&ic|onRect);|
|000017f0| 0d 0d 09 2f 2a 20 70 72 | 65 70 61 72 65 20 74 68 |.../* pr|epare th|
|00001800| 65 20 73 6f 75 72 63 65 | 20 61 6e 64 20 64 65 73 |e source| and des|
|00001810| 74 69 6e 61 74 69 6f 6e | 20 62 69 74 6d 61 70 73 |tination| bitmaps|
|00001820| 2e 20 2a 2f 0d 09 73 6f | 75 72 63 65 2e 62 61 73 |. */..so|urce.bas|
|00001830| 65 41 64 64 72 20 3d 20 | 2a 69 63 6f 6e 20 2b 20 |eAddr = |*icon + |
|00001840| 31 32 38 3b 09 09 09 09 | 09 2f 2a 20 6d 61 73 6b |128;....|./* mask|
|00001850| 20 61 64 64 72 65 73 73 | 2e 20 2a 2f 0d 09 73 6f | address|. */..so|
|00001860| 75 72 63 65 2e 72 6f 77 | 42 79 74 65 73 20 3d 20 |urce.row|Bytes = |
|00001870| 34 3b 0d 09 53 65 74 52 | 65 63 74 28 26 73 6f 75 |4;..SetR|ect(&sou|
|00001880| 72 63 65 2e 62 6f 75 6e | 64 73 2c 20 30 2c 20 30 |rce.boun|ds, 0, 0|
|00001890| 2c 20 33 32 2c 20 33 32 | 29 3b 0d 09 64 65 73 74 |, 32, 32|);..dest|
|000018a0| 69 6e 61 74 69 6f 6e 20 | 3d 20 28 28 47 72 61 66 |ination |= ((Graf|
|000018b0| 50 74 72 29 70 6f 72 74 | 29 2d 3e 70 6f 72 74 42 |Ptr)port|)->portB|
|000018c0| 69 74 73 3b 0d 09 0d 09 | 2f 2a 20 74 72 61 6e 73 |its;....|/* trans|
|000018d0| 66 65 72 20 74 68 65 20 | 6d 61 73 6b 2e 20 2a 2f |fer the |mask. */|
|000018e0| 0d 09 43 6f 70 79 42 69 | 74 73 28 26 73 6f 75 72 |..CopyBi|ts(&sour|
|000018f0| 63 65 2c 20 26 64 65 73 | 74 69 6e 61 74 69 6f 6e |ce, &des|tination|
|00001900| 2c 20 26 73 6f 75 72 63 | 65 2e 62 6f 75 6e 64 73 |, &sourc|e.bounds|
|00001910| 2c 20 26 69 63 6f 6e 52 | 65 63 74 2c 20 73 72 63 |, &iconR|ect, src|
|00001920| 42 69 63 2c 20 6e 69 6c | 29 3b 0d 09 0d 09 2f 2a |Bic, nil|);..../*|
|00001930| 20 61 6e 64 20 74 68 65 | 20 69 63 6f 6e 2e 20 2a | and the| icon. *|
|00001940| 2f 0d 09 73 6f 75 72 63 | 65 2e 62 61 73 65 41 64 |/..sourc|e.baseAd|
|00001950| 64 72 20 3d 20 2a 69 63 | 6f 6e 3b 09 0d 09 43 6f |dr = *ic|on;...Co|
|00001960| 70 79 42 69 74 73 28 26 | 73 6f 75 72 63 65 2c 20 |pyBits(&|source, |
|00001970| 26 64 65 73 74 69 6e 61 | 74 69 6f 6e 2c 20 26 73 |&destina|tion, &s|
|00001980| 6f 75 72 63 65 2e 62 6f | 75 6e 64 73 2c 20 26 69 |ource.bo|unds, &i|
|00001990| 63 6f 6e 52 65 63 74 2c | 20 73 72 63 4f 72 2c 20 |conRect,| srcOr, |
|000019a0| 6e 69 6c 29 3b 0d 09 0d | 09 52 65 6c 65 61 73 65 |nil);...|.Release|
|000019b0| 52 65 73 6f 75 72 63 65 | 28 69 63 6f 6e 29 3b 0d |Resource|(icon);.|
|000019c0| 7d 0d 0d 2f 2a 0d 09 43 | 68 6f 6f 73 65 49 63 6f |}../*..C|hooseIco|
|000019d0| 6e 28 29 20 63 68 6f 6f | 73 65 73 20 74 68 65 20 |n() choo|ses the |
|000019e0| 6f 70 74 69 6d 61 6c 20 | 69 63 6f 6e 20 66 6f 72 |optimal |icon for|
|000019f0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 73 63 72 | the cur|rent scr|
|00001a00| 65 65 6e 20 64 65 70 74 | 68 2e 0d 09 0d 09 50 72 |een dept|h.....Pr|
|00001a10| 69 6f 72 69 74 69 65 73 | 20 66 6f 72 20 63 68 6f |iorities| for cho|
|00001a20| 6f 73 69 6e 67 20 69 63 | 6f 6e 73 3a 0d 09 09 31 |osing ic|ons:...1|
|00001a30| 2e 20 6d 61 74 63 68 20 | 74 68 65 20 62 69 74 20 |. match |the bit |
|00001a40| 64 65 70 74 68 20 74 6f | 20 74 68 65 20 69 63 6f |depth to| the ico|
|00001a50| 6e 2e 0d 09 09 32 2e 20 | 75 73 65 20 61 6c 74 65 |n....2. |use alte|
|00001a60| 72 6e 61 74 65 20 62 69 | 74 20 64 65 70 74 68 20 |rnate bi|t depth |
|00001a70| 76 65 72 73 69 6f 6e 20 | 69 66 20 61 76 61 69 6c |version |if avail|
|00001a80| 61 62 6c 65 2e 0d 09 09 | 33 2e 20 64 72 61 77 20 |able....|3. draw |
|00001a90| 74 68 65 20 62 6c 61 63 | 6b 20 26 20 77 68 69 74 |the blac|k & whit|
|00001aa0| 65 20 76 65 72 73 69 6f | 6e 2e 0d 20 2a 2f 0d 09 |e versio|n.. */..|
|00001ab0| 0d 48 61 6e 64 6c 65 20 | 43 68 6f 6f 73 65 49 63 |.Handle |ChooseIc|
|00001ac0| 6f 6e 28 73 68 6f 72 74 | 20 69 63 6f 6e 49 64 2c |on(short| iconId,|
|00001ad0| 20 73 68 6f 72 74 2a 20 | 73 75 67 67 65 73 74 65 | short* |suggeste|
|00001ae0| 64 44 65 70 74 68 29 0d | 7b 0d 09 73 68 6f 72 74 |dDepth).|{..short|
|00001af0| 20 64 65 70 74 68 20 3d | 20 2a 73 75 67 67 65 73 | depth =| *sugges|
|00001b00| 74 65 64 44 65 70 74 68 | 3b 0d 09 48 61 6e 64 6c |tedDepth|;..Handl|
|00001b10| 65 20 69 63 6f 6e 20 3d | 20 6e 69 6c 3b 0d 0d 09 |e icon =| nil;...|
|00001b20| 69 66 20 28 64 65 70 74 | 68 20 3d 3d 20 34 29 20 |if (dept|h == 4) |
|00001b30| 7b 0d 09 09 69 63 6f 6e | 20 3d 20 47 65 74 31 52 |{...icon| = Get1R|
|00001b40| 65 73 6f 75 72 63 65 28 | 27 69 63 6c 34 27 2c 20 |esource(|'icl4', |
|00001b50| 69 63 6f 6e 49 64 29 3b | 0d 09 09 69 66 20 28 21 |iconId);|...if (!|
|00001b60| 69 63 6f 6e 29 20 7b 0d | 09 09 09 2f 2a 20 74 72 |icon) {.|.../* tr|
|00001b70| 79 20 61 6c 74 65 72 6e | 61 74 65 20 64 65 70 74 |y altern|ate dept|
|00001b80| 68 2e 20 2a 2f 0d 09 09 | 09 69 63 6f 6e 20 3d 20 |h. */...|.icon = |
|00001b90| 47 65 74 31 52 65 73 6f | 75 72 63 65 28 27 69 63 |Get1Reso|urce('ic|
|00001ba0| 6c 38 27 2c 20 69 63 6f | 6e 49 64 29 3b 0d 09 09 |l8', ico|nId);...|
|00001bb0| 09 69 66 20 28 69 63 6f | 6e 29 0d 09 09 09 09 64 |.if (ico|n).....d|
|00001bc0| 65 70 74 68 20 3d 20 38 | 3b 0d 09 09 7d 0d 09 7d |epth = 8|;...}..}|
|00001bd0| 20 65 6c 73 65 20 7b 0d | 09 09 64 65 70 74 68 20 | else {.|..depth |
|00001be0| 3d 20 38 3b 0d 09 09 69 | 63 6f 6e 20 3d 20 47 65 |= 8;...i|con = Ge|
|00001bf0| 74 31 52 65 73 6f 75 72 | 63 65 28 27 69 63 6c 38 |t1Resour|ce('icl8|
|00001c00| 27 2c 20 69 63 6f 6e 49 | 64 29 3b 0d 09 09 69 66 |', iconI|d);...if|
|00001c10| 20 28 21 69 63 6f 6e 29 | 20 7b 0d 09 09 09 2f 2a | (!icon)| {..../*|
|00001c20| 20 74 72 79 20 61 6c 74 | 65 72 6e 61 74 65 20 64 | try alt|ernate d|
|00001c30| 65 70 74 68 2e 20 2a 2f | 0d 09 09 09 69 63 6f 6e |epth. */|....icon|
|00001c40| 20 3d 20 47 65 74 31 52 | 65 73 6f 75 72 63 65 28 | = Get1R|esource(|
|00001c50| 27 69 63 6c 34 27 2c 20 | 69 63 6f 6e 49 64 29 3b |'icl4', |iconId);|
|00001c60| 0d 09 09 09 69 66 20 28 | 69 63 6f 6e 29 0d 09 09 |....if (|icon)...|
|00001c70| 09 09 64 65 70 74 68 20 | 3d 20 34 3b 0d 09 09 7d |..depth |= 4;...}|
|00001c80| 0d 09 7d 0d 09 0d 09 2a | 73 75 67 67 65 73 74 65 |..}....*|suggeste|
|00001c90| 64 44 65 70 74 68 20 3d | 20 64 65 70 74 68 3b 0d |dDepth =| depth;.|
|00001ca0| 09 72 65 74 75 72 6e 20 | 69 63 6f 6e 3b 0d 7d 0d |.return |icon;.}.|
|00001cb0| 0d 2f 2a 20 44 72 61 77 | 43 6f 6c 6f 72 49 63 6f |./* Draw|ColorIco|
|00001cc0| 6e 28 29 20 64 72 61 77 | 73 20 74 68 65 20 61 70 |n() draw|s the ap|
|00001cd0| 70 72 6f 70 72 69 61 74 | 65 20 69 63 6f 6e 20 66 |propriat|e icon f|
|00001ce0| 6f 72 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 73 |or the c|urrent s|
|00001cf0| 63 72 65 65 6e 20 64 65 | 70 74 68 2e 20 2a 2f 0d |creen de|pth. */.|
|00001d00| 0d 76 6f 69 64 20 44 72 | 61 77 43 6f 6c 6f 72 49 |.void Dr|awColorI|
|00001d10| 63 6f 6e 28 73 68 6f 72 | 74 20 69 63 6f 6e 49 64 |con(shor|t iconId|
|00001d20| 29 0d 7b 0d 09 73 68 6f | 72 74 20 64 65 70 74 68 |).{..sho|rt depth|
|00001d30| 54 6f 55 73 65 3b 0d 09 | 48 61 6e 64 6c 65 20 6d |ToUse;..|Handle m|
|00001d40| 61 73 6b 2c 20 69 63 6f | 6e 3b 0d 09 43 54 61 62 |ask, ico|n;..CTab|
|00001d50| 48 61 6e 64 6c 65 20 63 | 6c 75 74 3b 0d 09 50 69 |Handle c|lut;..Pi|
|00001d60| 78 4d 61 70 48 61 6e 64 | 6c 65 20 73 6f 75 72 63 |xMapHand|le sourc|
|00001d70| 65 3b 0d 09 42 69 74 4d | 61 70 20 6d 61 73 6b 42 |e;..BitM|ap maskB|
|00001d80| 69 74 73 3b 0d 09 6c 6f | 6e 67 20 72 6f 77 42 79 |its;..lo|ng rowBy|
|00001d90| 74 65 73 3b 0d 09 52 65 | 63 74 20 69 63 6f 6e 52 |tes;..Re|ct iconR|
|00001da0| 65 63 74 2c 20 62 6f 75 | 6e 64 73 3b 0d 09 0d 09 |ect, bou|nds;....|
|00001db0| 2f 2a 20 62 79 20 64 65 | 66 61 75 6c 74 20 77 65 |/* by de|fault we|
|00001dc0| 20 77 69 6c 6c 20 62 65 | 20 75 73 69 6e 67 20 74 | will be| using t|
|00001dd0| 68 65 20 61 63 74 75 61 | 6c 20 64 65 70 74 68 20 |he actua|l depth |
|00001de0| 6f 66 20 74 68 65 20 73 | 63 72 65 65 6e 2e 20 2a |of the s|creen. *|
|00001df0| 2f 0d 09 64 65 70 74 68 | 54 6f 55 73 65 20 3d 20 |/..depth|ToUse = |
|00001e00| 74 68 65 44 65 70 74 68 | 3b 0d 09 69 63 6f 6e 20 |theDepth|;..icon |
|00001e10| 3d 20 43 68 6f 6f 73 65 | 49 63 6f 6e 28 69 63 6f |= Choose|Icon(ico|
|00001e20| 6e 49 64 2c 20 26 64 65 | 70 74 68 54 6f 55 73 65 |nId, &de|pthToUse|
|00001e30| 29 3b 0d 09 0d 09 2f 2a | 20 69 66 20 6e 6f 20 63 |);..../*| if no c|
|00001e40| 6f 6c 6f 72 20 69 63 6f | 6e 20 61 76 61 69 6c 61 |olor ico|n availa|
|00001e50| 62 6c 65 2c 20 64 72 61 | 77 20 74 68 65 20 62 6c |ble, dra|w the bl|
|00001e60| 61 63 6b 20 26 20 77 68 | 69 74 65 20 69 63 6f 6e |ack & wh|ite icon|
|00001e70| 2e 20 2a 2f 0d 09 69 66 | 20 28 21 69 63 6f 6e 29 |. */..if| (!icon)|
|00001e80| 20 7b 0d 09 09 44 72 61 | 77 42 57 49 63 6f 6e 28 | {...Dra|wBWIcon(|
|00001e90| 69 63 6f 6e 49 64 29 3b | 0d 09 09 72 65 74 75 72 |iconId);|...retur|
|00001ea0| 6e 3b 0d 09 7d 0d 09 48 | 4c 6f 63 6b 28 69 63 6f |n;..}..H|Lock(ico|
|00001eb0| 6e 29 3b 0d 09 0d 09 2f | 2a 20 67 65 74 20 74 68 |n);..../|* get th|
|00001ec0| 65 20 62 6c 61 63 6b 20 | 26 20 77 68 69 74 65 20 |e black |& white |
|00001ed0| 69 63 6f 6e 20 74 6f 20 | 67 65 74 20 74 68 65 20 |icon to |get the |
|00001ee0| 6d 61 73 6b 20 64 72 61 | 77 6e 2e 20 2a 2f 0d 09 |mask dra|wn. */..|
|00001ef0| 6d 61 73 6b 20 3d 20 47 | 65 74 31 52 65 73 6f 75 |mask = G|et1Resou|
|00001f00| 72 63 65 28 27 49 43 4e | 23 27 2c 20 69 63 6f 6e |rce('ICN|#', icon|
|00001f10| 49 64 29 3b 0d 09 69 66 | 20 28 21 6d 61 73 6b 29 |Id);..if| (!mask)|
|00001f20| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 48 4c 6f 63 |...retur|n;..HLoc|
|00001f30| 6b 28 6d 61 73 6b 29 3b | 0d 0d 09 2f 2a 20 67 65 |k(mask);|.../* ge|
|00001f40| 74 20 74 68 65 20 63 6f | 72 72 65 63 74 20 63 6f |t the co|rrect co|
|00001f50| 6c 6f 72 20 6c 6f 6f 6b | 75 70 20 74 61 62 6c 65 |lor look|up table|
|00001f60| 2e 20 2a 2f 0d 09 63 6c | 75 74 20 3d 20 47 65 74 |. */..cl|ut = Get|
|00001f70| 43 54 61 62 6c 65 28 64 | 65 70 74 68 54 6f 55 73 |CTable(d|epthToUs|
|00001f80| 65 29 3b 0d 09 69 66 20 | 28 21 63 6c 75 74 29 0d |e);..if |(!clut).|
|00001f90| 09 09 72 65 74 75 72 6e | 3b 0d 09 0d 09 2f 2a 20 |..return|;..../* |
|00001fa0| 63 72 65 61 74 65 20 61 | 20 70 69 78 6d 61 70 20 |create a| pixmap |
|00001fb0| 74 6f 20 73 74 69 63 6b | 20 74 68 65 20 69 63 6f |to stick| the ico|
|00001fc0| 6e 20 62 69 74 73 20 69 | 6e 74 6f 20 66 6f 72 20 |n bits i|nto for |
|00001fd0| 73 63 72 65 65 6e 20 62 | 6c 69 74 74 69 6e 67 2e |screen b|litting.|
|00001fe0| 20 2a 2f 0d 09 73 6f 75 | 72 63 65 20 3d 20 4e 65 | */..sou|rce = Ne|
|00001ff0| 77 50 69 78 4d 61 70 28 | 29 3b 0d 09 69 66 20 28 |wPixMap(|);..if (|
|00002000| 21 73 6f 75 72 63 65 29 | 20 7b 0d 09 09 44 69 73 |!source)| {...Dis|
|00002010| 70 6f 73 43 54 61 62 6c | 65 28 63 6c 75 74 29 3b |posCTabl|e(clut);|
|00002020| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 7d 0d 09 0d |...retur|n;..}...|
|00002030| 09 2f 2a 20 73 65 74 20 | 75 70 20 74 68 65 20 73 |./* set |up the s|
|00002040| 6f 75 72 63 65 20 70 69 | 78 6d 61 70 20 77 69 74 |ource pi|xmap wit|
|00002050| 68 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |h the ap|propriat|
|00002060| 65 20 62 6f 75 6e 64 73 | 2c 20 64 65 70 74 68 2c |e bounds|, depth,|
|00002070| 20 61 6e 64 20 63 6c 75 | 74 2e 20 2a 2f 0d 09 62 | and clu|t. */..b|
|00002080| 6f 75 6e 64 73 2e 74 6f | 70 20 3d 20 62 6f 75 6e |ounds.to|p = boun|
|00002090| 64 73 2e 6c 65 66 74 20 | 3d 20 30 3b 0d 09 62 6f |ds.left |= 0;..bo|
|000020a0| 75 6e 64 73 2e 62 6f 74 | 74 6f 6d 20 3d 20 62 6f |unds.bot|tom = bo|
|000020b0| 75 6e 64 73 2e 72 69 67 | 68 74 20 3d 20 33 32 3b |unds.rig|ht = 32;|
|000020c0| 0d 09 72 6f 77 42 79 74 | 65 73 20 3d 20 28 28 28 |..rowByt|es = (((|
|000020d0| 64 65 70 74 68 54 6f 55 | 73 65 20 2a 20 33 32 29 |depthToU|se * 32)|
|000020e0| 20 2b 20 31 35 29 20 2f | 20 31 36 29 20 2a 20 32 | + 15) /| 16) * 2|
|000020f0| 3b 0d 09 28 2a 2a 73 6f | 75 72 63 65 29 2e 62 61 |;..(**so|urce).ba|
|00002100| 73 65 41 64 64 72 20 3d | 20 2a 69 63 6f 6e 3b 0d |seAddr =| *icon;.|
|00002110| 09 28 2a 2a 73 6f 75 72 | 63 65 29 2e 72 6f 77 42 |.(**sour|ce).rowB|
|00002120| 79 74 65 73 20 3d 20 28 | 28 73 68 6f 72 74 29 72 |ytes = (|(short)r|
|00002130| 6f 77 42 79 74 65 73 29 | 20 7c 20 30 78 38 30 30 |owBytes)| | 0x800|
|00002140| 30 3b 0d 09 28 2a 2a 73 | 6f 75 72 63 65 29 2e 62 |0;..(**s|ource).b|
|00002150| 6f 75 6e 64 73 20 3d 20 | 62 6f 75 6e 64 73 3b 0d |ounds = |bounds;.|
|00002160| 09 28 2a 2a 73 6f 75 72 | 63 65 29 2e 70 69 78 65 |.(**sour|ce).pixe|
|00002170| 6c 54 79 70 65 20 3d 20 | 30 3b 09 09 09 2f 2a 20 |lType = |0;.../* |
|00002180| 63 68 75 6e 6b 79 20 6d | 6f 64 65 6c 2e 20 2a 2f |chunky m|odel. */|
|00002190| 0d 09 28 2a 2a 73 6f 75 | 72 63 65 29 2e 70 69 78 |..(**sou|rce).pix|
|000021a0| 65 6c 53 69 7a 65 20 3d | 20 64 65 70 74 68 54 6f |elSize =| depthTo|
|000021b0| 55 73 65 3b 0d 09 28 2a | 2a 73 6f 75 72 63 65 29 |Use;..(*|*source)|
|000021c0| 2e 63 6d 70 43 6f 75 6e | 74 20 3d 20 31 3b 09 09 |.cmpCoun|t = 1;..|
|000021d0| 09 2f 2a 20 69 66 20 69 | 6e 20 33 32 20 62 69 74 |./* if i|n 32 bit|
|000021e0| 20 6d 6f 64 65 20 74 68 | 69 73 20 77 69 6c 6c 20 | mode th|is will |
|000021f0| 62 65 20 33 2c 20 73 6f | 20 6d 75 73 74 20 63 68 |be 3, so| must ch|
|00002200| 61 6e 67 65 2e 20 2a 2f | 0d 09 28 2a 2a 73 6f 75 |ange. */|..(**sou|
|00002210| 72 63 65 29 2e 63 6d 70 | 53 69 7a 65 20 3d 20 64 |rce).cmp|Size = d|
|00002220| 65 70 74 68 54 6f 55 73 | 65 3b 09 2f 2a 20 6f 6e |epthToUs|e;./* on|
|00002230| 6c 79 20 63 68 75 6e 6b | 79 20 69 6d 61 67 65 73 |ly chunk|y images|
|00002240| 20 75 73 65 64 2e 20 2a | 2f 0d 09 44 69 73 70 6f | used. *|/..Dispo|
|00002250| 73 43 54 61 62 6c 65 28 | 28 2a 2a 73 6f 75 72 63 |sCTable(|(**sourc|
|00002260| 65 29 2e 70 6d 54 61 62 | 6c 65 29 3b 09 2f 2a 20 |e).pmTab|le);./* |
|00002270| 64 69 73 70 6f 73 65 20 | 6f 66 20 64 65 66 61 75 |dispose |of defau|
|00002280| 6c 74 2c 20 75 6e 69 6e | 69 74 69 61 6c 69 7a 65 |lt, unin|itialize|
|00002290| 64 20 74 61 62 6c 65 2e | 20 2a 2f 0d 09 28 2a 2a |d table.| */..(**|
|000022a0| 73 6f 75 72 63 65 29 2e | 70 6d 54 61 62 6c 65 20 |source).|pmTable |
|000022b0| 3d 20 63 6c 75 74 3b 0d | 0d 09 2f 2a 20 67 65 74 |= clut;.|../* get|
|000022c0| 20 70 6f 73 69 74 69 6f | 6e 20 74 6f 20 64 72 61 | positio|n to dra|
|000022d0| 77 20 69 63 6f 6e 20 69 | 6e 2e 20 2a 2f 0d 09 47 |w icon i|n. */..G|
|000022e0| 65 74 49 63 6f 6e 52 65 | 63 74 28 26 69 63 6f 6e |etIconRe|ct(&icon|
|000022f0| 52 65 63 74 29 3b 0d 0d | 09 2f 2a 20 70 72 65 70 |Rect);..|./* prep|
|00002300| 61 72 65 20 74 68 65 20 | 6d 61 73 6b 20 62 69 74 |are the |mask bit|
|00002310| 6d 61 70 2e 20 2a 2f 0d | 09 6d 61 73 6b 42 69 74 |map. */.|.maskBit|
|00002320| 73 2e 62 61 73 65 41 64 | 64 72 20 3d 20 2a 6d 61 |s.baseAd|dr = *ma|
|00002330| 73 6b 20 2b 20 31 32 38 | 3b 09 09 09 09 09 2f 2a |sk + 128|;...../*|
|00002340| 20 6d 61 73 6b 20 61 64 | 64 72 65 73 73 2e 20 2a | mask ad|dress. *|
|00002350| 2f 0d 09 6d 61 73 6b 42 | 69 74 73 2e 72 6f 77 42 |/..maskB|its.rowB|
|00002360| 79 74 65 73 20 3d 20 34 | 3b 0d 09 6d 61 73 6b 42 |ytes = 4|;..maskB|
|00002370| 69 74 73 2e 62 6f 75 6e | 64 73 20 3d 20 62 6f 75 |its.boun|ds = bou|
|00002380| 6e 64 73 3b 0d 0d 09 2f | 2a 20 70 75 6e 63 68 20 |nds;.../|* punch |
|00002390| 6f 75 74 20 74 68 65 20 | 6d 61 73 6b 2e 20 2a 2f |out the |mask. */|
|000023a0| 09 0d 09 43 6f 70 79 42 | 69 74 73 28 26 6d 61 73 |...CopyB|its(&mas|
|000023b0| 6b 42 69 74 73 2c 20 28 | 42 69 74 4d 61 70 2a 29 |kBits, (|BitMap*)|
|000023c0| 26 70 6f 72 74 2d 3e 70 | 6f 72 74 50 69 78 4d 61 |&port->p|ortPixMa|
|000023d0| 70 2c 20 26 62 6f 75 6e | 64 73 2c 20 26 69 63 6f |p, &boun|ds, &ico|
|000023e0| 6e 52 65 63 74 2c 20 73 | 72 63 42 69 63 2c 20 6e |nRect, s|rcBic, n|
|000023f0| 69 6c 29 3b 0d 09 0d 09 | 2f 2a 20 64 72 61 77 20 |il);....|/* draw |
|00002400| 74 68 65 20 61 63 74 75 | 61 6c 20 63 6f 6c 6f 72 |the actu|al color|
|00002410| 20 69 63 6f 6e 2e 20 2a | 2f 0d 09 48 4c 6f 63 6b | icon. *|/..HLock|
|00002420| 28 28 48 61 6e 64 6c 65 | 29 73 6f 75 72 63 65 29 |((Handle|)source)|
|00002430| 3b 0d 09 43 6f 70 79 42 | 69 74 73 28 28 42 69 74 |;..CopyB|its((Bit|
|00002440| 4d 61 70 2a 29 2a 73 6f | 75 72 63 65 2c 20 28 42 |Map*)*so|urce, (B|
|00002450| 69 74 4d 61 70 2a 29 26 | 70 6f 72 74 2d 3e 70 6f |itMap*)&|port->po|
|00002460| 72 74 50 69 78 4d 61 70 | 2c 20 26 62 6f 75 6e 64 |rtPixMap|, &bound|
|00002470| 73 2c 20 26 69 63 6f 6e | 52 65 63 74 2c 20 73 72 |s, &icon|Rect, sr|
|00002480| 63 4f 72 2c 20 6e 69 6c | 29 3b 0d 09 0d 09 2f 2a |cOr, nil|);..../*|
|00002490| 20 72 65 6c 65 61 73 65 | 20 65 76 65 72 79 74 68 | release| everyth|
|000024a0| 69 6e 67 20 77 65 27 76 | 65 20 61 6c 6c 6f 63 61 |ing we'v|e alloca|
|000024b0| 74 65 64 2e 20 2a 2f 0d | 09 28 2a 2a 73 6f 75 72 |ted. */.|.(**sour|
|000024c0| 63 65 29 2e 62 61 73 65 | 41 64 64 72 20 3d 20 6e |ce).base|Addr = n|
|000024d0| 69 6c 3b 0d 09 44 69 73 | 70 6f 73 50 69 78 4d 61 |il;..Dis|posPixMa|
|000024e0| 70 28 73 6f 75 72 63 65 | 29 3b 0d 09 0d 09 2f 2a |p(source|);..../*|
|000024f0| 20 72 65 6c 65 61 73 65 | 20 74 68 65 20 69 63 6f | release| the ico|
|00002500| 6e 20 61 6e 64 20 6d 61 | 73 6b 2e 20 2a 2f 0d 09 |n and ma|sk. */..|
|00002510| 52 65 6c 65 61 73 65 52 | 65 73 6f 75 72 63 65 28 |ReleaseR|esource(|
|00002520| 69 63 6f 6e 29 3b 0d 09 | 52 65 6c 65 61 73 65 52 |icon);..|ReleaseR|
|00002530| 65 73 6f 75 72 63 65 28 | 6d 61 73 6b 29 3b 0d 7d |esource(|mask);.}|
|00002540| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 01 00 00 00 01 0c | 00 00 00 0c 00 00 00 32 |........|.......2|
|00002590| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000025a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000025b0| 10 53 68 6f 77 49 63 6f | 6e 46 61 6d 69 6c 79 2e |.ShowIco|nFamily.|
|000025c0| 63 6f 02 00 00 00 54 45 | 58 54 4b 41 48 4c 01 00 |co....TE|XTKAHL..|
|000025d0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 d0 00 00 |..TEXTKA|HL......|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 a6 86 0f 30 00 00 | 24 c1 00 00 01 3e 6e 74 |.....0..|$....>nt|
|00002600| 65 72 66 61 63 65 20 74 | 6f 20 74 68 65 20 4d 61 |erface t|o the Ma|
|00002610| 63 69 6e 74 6f 73 68 20 | 4c 69 62 72 61 72 69 65 |cintosh |Librarie|
|00002620| 73 0d 0d 0d 20 20 20 20 | 20 20 20 20 43 6f 70 79 |s... | Copy|
|00002630| 72 69 67 68 74 20 41 70 | 70 6c 65 20 43 6f 6d 70 |right Ap|ple Comp|
|00002640| 75 74 65 72 2c 20 49 6e | 63 2e 20 20 20 20 31 39 |uter, In|c. 19|
|00002650| 38 35 2d 31 39 38 39 0d | 20 20 20 20 20 20 20 20 |85-1989.| |
|00002660| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|00002670| 76 65 64 0d 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ved..***|********|
|00002680| 00 00 00 08 00 38 00 14 | 01 d6 02 40 00 00 01 00 |.....8..|...@....|
|00002690| 00 00 01 0c 00 00 00 0c | 00 00 00 32 00 66 5d 78 |........|...2.f]x|
|000026a0| 12 00 00 00 00 1c 00 32 | 00 00 52 45 43 54 00 00 |.......2|..RECT..|
|000026b0| 00 0a 00 00 ff ff 00 00 | 00 00 00 66 5c cc 00 00 |........|...f\...|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+